-- GENERATED SPELL FOR [Moonkin Oracle] --


function spell0_10157(pUnit, Event) --@Moonfire,n/a--
pUnit:FullCastSpellOnTarget(15798,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10157', 12000, 1)
end

function spell1_10157(pUnit, Event) --@Regrowth,n/a--
pUnit:FullCastSpellOnTarget(16561,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10157', 23000, 1)
end

function spell2_10157(pUnit, Event) --@Wrath,n/a--
pUnit:FullCastSpellOnTarget(9739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10157', 2000, 1)
end

function Sorts_10157(pUnit, Event)
local choix_sorts_10157 = math.random(0, 2)
if choix_sorts_10157 == 0 then
pUnit:RegisterEvent('spell0_10157', 1, 1)
end
if choix_sorts_10157 == 1 then
pUnit:RegisterEvent('spell1_10157', 1, 1)
end
if choix_sorts_10157 == 2 then
pUnit:RegisterEvent('spell2_10157', 1, 1)
end
end

function mob10157_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10157', math.random(1500, 3000), 1)
end

function mob10157_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10157_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10157_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10157, 1, 'mob10157_Action')
RegisterUnitEvent(10157, 2, 'mob10157_Leave')
RegisterUnitEvent(10157, 3, 'mob10157_Kill')
RegisterUnitEvent(10157, 4, 'mob10157_Die')
